package com.zheng.rpc.Impl;

import com.zheng.rpc.annotations.RpcService;
import com.zheng.rpc.api.HelloService;
import com.zheng.rpc.entities.Hello;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RpcService(group = "test", version = "v1.0")
public class HelloServiceImpl implements HelloService {
    static {
        System.out.println("HelloServiceImpl被创建");
    }

    public String hello(Hello hello) {
        log.info("HelloServiceImpl收到: {}.", hello.getMessage());
        String result = "Hello description is " + hello.getDescription();
        log.info("HelloServiceImpl返回: {}.", result);
        return result;
    }
}
